import React, { Component } from 'react'
// 引入高阶组件 本质就是一个函数
import withLayout from './hoc/withLayout'

class Child extends Component {
  render() {
    console.log('child', this.props)
    return (
      <div>
        <h3>我是子组件</h3>
      </div>
    )
  }
}

// 调用了高阶组件
const Childcmp = withLayout(Child)

class App extends Component {
  render() {
    return (
      <div>
        <Childcmp title="我是父组件中的标题" age={22} />
      </div>
    )
  }
}

export default App
